package com.gaogzhen.designPattern.immutableObject.immutable;

import lombok.extern.slf4j.Slf4j;

import java.text.ParseException;
import java.text.SimpleDateFormat;

@Slf4j(topic = "c.DateFormatMutable")
public class DateFormatMutable {
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for (int i = 0; i < 10; i++) {
            new Thread(() -> {
                try {
                    log.debug("{}",sdf.parse("2021-10-01"));
                } catch (ParseException e) {
                    log.error("{}", e);
                }
            }).start();
        }
    }
}
